"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING, DATE, TEXT } = Sequelize;
    await queryInterface.createTable("user", {
      id: { autoIncrement: true, primaryKey: true, type: INTEGER },
      project: STRING,
      env: STRING,
      msg: STRING,
      url: STRING,
      line: STRING,
      col: STRING,
      error: TEXT,

      // 这两个要加上
      created_at: DATE,
      updated_at: DATE,
    });
  },
  down: async (queryInterface, Sequelize) => {
    await queryInterface.dropTable("user");
  },
};
